]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
calendar: Refresh calendar when ignored events changes
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 7 Jul 2016 23:08:46 +0000 (01:08 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 8 Jul 2016 13:01:32 +0000 (15:01 +0200)
The last patch fixed marking days in the calendar where all
events are ignored, but it doesn't pick up the change when
an event is hidden. Emit an appropriate change notification
to fix this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=768538

js/ui/calendar.js

index 110ff7bf4e0ca6b6fc6eb5427f2b03537b177009..7958e9d16fc4096c9ace89523b3e1e050a5a32fe 100644 (file)
@@ -311,9 +311,13 @@ const DBusEventSource = new Lang.Class({
     },
 
     ignoreEvent: function(event) {
+        if (this._ignoredEvents.get(event.id))
+            return;
+
         this._ignoredEvents.set(event.id, true);
         let savedState = new GLib.Variant('as', [...this._ignoredEvents.keys()]);
         global.set_persistent_state('ignored_events', savedState);
+        this.emit('changed');
     },
 
     requestRange: function(begin, end) {